import Server from './server'


class API extends Server {
  async getMyBook (data) {
    try {
      let result = await this.Api('POST', '/home', {})
      if (result.status !== 0 && (result instanceof Object)) {
        return result || []
      } else {
        let err = {
          tip: '获取书架书本信息错误',
          response: result,
        }
        throw (err)
      }
    } catch (err) {
      throw err
    }
  }
}


export default new API()